package com.anlogic.sdk.toolpreference.utils;

import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.osgi.service.prefs.BackingStoreException;

public class BootGenPrefsUtils {
	public static final String PLUGIN_ID="com.anlogic.sdk.bootimage";
	
	public static IEclipsePreferences  getPreferences() {
		IEclipsePreferences preferences = InstanceScope.INSTANCE.getNode(PLUGIN_ID);
		return preferences;
	}

	public static void flush() {
		try {
			getPreferences().flush();
		} catch (BackingStoreException e) {
			e.printStackTrace();
		}
	}
}
